<template>
  {{msg}}<br>
  <button v-on:click="f">按钮</button>
  <button @click="m">按钮2></button>
</template>

<script lang="ts" setup>

import {ref} from "vue";

const msg=ref('hello')

const f=()=>{
  alert(msg.value)
}
const m=()=>{
  msg.value=''+prompt("请输入一个值:")
  
}

</script>

<style>

</style>
